package com.hong.spring.common.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * @Auther: csh
 * @Date: 2020/7/10 17:07
 * @Description:spElUser2
 */
@Component("spElUser2")
public class SpElUser2 implements Serializable {
    @Value("${user.name}")
    private String userName;
    @Value("${user.age}")
    private int age;

    public SpElUser2() {
    }

    public SpElUser2(String userName, int age) {
        this.userName = userName;
        this.age = age;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Boolean viladUsername(String userName){
        return this.userName.equalsIgnoreCase(userName);
    }

    private Boolean viladUsername2(String userName){
        return this.userName.equalsIgnoreCase(userName);
    }

    public static Boolean viladUsername3(String userName){
        return userName.equalsIgnoreCase(userName);
    }
}
